Skip to content

Commit f813aa3

Browse files
committed
remove requirements for source form properties
1 parent 3ba93aa commit f813aa3

File tree

6 files changed

+33
-94
lines changed

6 files changed

+33
-94
lines changed

docs/GoogleAnalyticsSourceFormProperties.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Name | Type | Description | Notes
1111
**frequency_in_minutes** | **str** | Defines how often, in minutes, Stitch should attempt to replicate data from Google Analytics. Accepted values are: - 30 - 60 - 360 - 720 - 1440 | [optional]
1212
**quota_user** | **str** | Note: This is a read-only property and will be returned when the Google Analytics object is successfully created. Including it in POST or PUT requests will result in InvalidProperties errors. | [optional]
1313
**refresh_token** | **str** | The OAuth 2.0 refresh token used to access the Google API. | [optional]
14-
**report_definitions** | [**list[GoogleAnalyticsSourceFormPropertiesReportDefinitions]**](GoogleAnalyticsSourceFormPropertiesReportDefinitions.md) | An array of objects, each object pertaining to a custom report you want to create. Note: Metrics and dimensions for each report can be selected when the source proceeds to the field_selection step. |
15-
**start_date** | **str** | The date from which Stitch should begin replicating data from Salesforce. Data from this date forward will be replicated. This field must contain an ISO 8601-compliant date, and the timestamp must be midnight. For example: 2018-01-01T00:00:00Z |
14+
**report_definitions** | [**list[GoogleAnalyticsSourceFormPropertiesReportDefinitions]**](GoogleAnalyticsSourceFormPropertiesReportDefinitions.md) | An array of objects, each object pertaining to a custom report you want to create. Note: Metrics and dimensions for each report can be selected when the source proceeds to the field_selection step. | [optional]
15+
**start_date** | **str** | The date from which Stitch should begin replicating data from Salesforce. Data from this date forward will be replicated. This field must contain an ISO 8601-compliant date, and the timestamp must be midnight. For example: 2018-01-01T00:00:00Z | [optional]
1616

1717
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1818

docs/SalesforceSourceFormProperties.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ Salesforce connections read data from the Salesforce API and correspond to sourc
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**anchor_time** | **str** | Defines the time that frequency_in_minutes is “anchored” to, which Stitch will use to create the integration’s replication schedule. In Stitch, this is referred to as Anchor Scheduling. This field must contain an ISO 8601-compliant date. Note: When Stitch stores this value, it will be in UTC. You should provide this value in UTC to ensure the desired anchor time is retained. For example: You want to create a schedule that is anchored to 1:00PM EST and runs every 6 hours (360 minutes). To do this, you can set anchor_time to something like 2018-04-30T17:00:00Z and frequency_in_minutes to 360. This means jobs would run at 23:00:00, 05:00:00, 11:00:00, and so on. | [optional]
8-
**api_type** | **str** | The Salesforce API Stitch should use to extract data. Possible values are REST or BULK. |
8+
**api_type** | **str** | The Salesforce API Stitch should use to extract data. Possible values are REST or BULK. | [optional]
99
**client_id** | **str** | The secure OAuth 2.0 identifier for the client application. | [optional]
1010
**client_secret** | **str** | The secure OAuth 2.0 secret key for the client application. | [optional]
1111
**cron_expression** | **str** | Note: Advanced Scheduling using Cron is not yet supported for this source. A value may be submitted for this property if the account is on an Enterprise plan, but Stitch will not use the expression submitted. A valid Quartz cron expression representing the replication schedule for the integration. Refer to the Advanced Scheduling documentation for more info. Note: If neither a cron_expression or frequency_in_minutes property is provided, Stitch will use the source’s default frequency_in_minutes value (60). | [optional]
12-
**frequency_in_minutes** | **str** | Defines how often, in minutes, Stitch should attempt to replicate data from Salesforce. Accepted values are: - 30 - 60 - 360 - 720 - 1440 |
12+
**frequency_in_minutes** | **str** | Defines how often, in minutes, Stitch should attempt to replicate data from Salesforce. Accepted values are: - 30 - 60 - 360 - 720 - 1440 | [optional]
1313
**instance_url** | **str** | The url of the instance to connect to. | [optional]
1414
**is_sandbox** | **str** | If `true`, the Salesforce account being connected is a sandbox. | [optional]
1515
**quota_percent_per_run** | **str** | The maximum percentage of Salesforce API quota allowed per replication job. | [optional]
1616
**quota_percent_total** | **str** | The maximum percentage of Salesforce API quota allowed per day. | [optional]
1717
**refresh_token** | **str** | The OAuth 2.0 refresh token used to access the Salesforce API. | [optional]
18-
**select_fields_by_default** | **str** | If `true`, Stitch will automatically set new fields added in Salesforce to replicate. |
19-
**start_date** | **str** | The date from which Stitch should begin replicating data from Salesforce. Data from this date forward will be replicated. This field must contain an ISO 8601-compliant date, and the timestamp must be midnight. For example: 2018-01-01T00:00:00Z |
18+
**select_fields_by_default** | **str** | If `true`, Stitch will automatically set new fields added in Salesforce to replicate. | [optional]
19+
**start_date** | **str** | The date from which Stitch should begin replicating data from Salesforce. Data from this date forward will be replicated. This field must contain an ISO 8601-compliant date, and the timestamp must be midnight. For example: 2018-01-01T00:00:00Z | [optional]
2020

2121
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2222

docs/SourceFormProperties.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ Parameters for connecting to the source, excluding any sensitive credentials. Th
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**anchor_time** | **str** | Defines the time that frequency_in_minutes is “anchored” to, which Stitch will use to create the integration’s replication schedule. In Stitch, this is referred to as Anchor Scheduling. This field must contain an ISO 8601-compliant date. Note: When Stitch stores this value, it will be in UTC. You should provide this value in UTC to ensure the desired anchor time is retained. For example: You want to create a schedule that is anchored to 1:00PM EST and runs every 6 hours (360 minutes). To do this, you can set anchor_time to something like 2018-04-30T17:00:00Z and frequency_in_minutes to 360. This means jobs would run at 23:00:00, 05:00:00, 11:00:00, and so on. | [optional]
8-
**api_type** | **str** | The Salesforce API Stitch should use to extract data. Possible values are REST or BULK. |
8+
**api_type** | **str** | The Salesforce API Stitch should use to extract data. Possible values are REST or BULK. | [optional]
99
**client_id** | **str** | The secure OAuth 2.0 identifier for the client application. | [optional]
1010
**client_secret** | **str** | The secure OAuth 2.0 secret key for the client application. | [optional]
1111
**cron_expression** | **str** | Note: Advanced Scheduling using Cron is not yet supported for this source. A value may be submitted for this property if the account is on an Enterprise plan, but Stitch will not use the expression submitted. A valid Quartz cron expression representing the replication schedule for the integration. Refer to the Advanced Scheduling documentation for more info. Note: If neither a cron_expression or frequency_in_minutes property is provided, Stitch will use the source’s default frequency_in_minutes value (60). | [optional]
12-
**frequency_in_minutes** | **str** | Defines how often, in minutes, Stitch should attempt to replicate data from Google Analytics. Accepted values are: - 30 - 60 - 360 - 720 - 1440 |
12+
**frequency_in_minutes** | **str** | Defines how often, in minutes, Stitch should attempt to replicate data from Google Analytics. Accepted values are: - 30 - 60 - 360 - 720 - 1440 | [optional]
1313
**instance_url** | **str** | The url of the instance to connect to. | [optional]
1414
**is_sandbox** | **str** | If `true`, the Salesforce account being connected is a sandbox. | [optional]
1515
**quota_percent_per_run** | **str** | The maximum percentage of Salesforce API quota allowed per replication job. | [optional]
1616
**quota_percent_total** | **str** | The maximum percentage of Salesforce API quota allowed per day. | [optional]
1717
**refresh_token** | **str** | The OAuth 2.0 refresh token used to access the Google API. | [optional]
18-
**select_fields_by_default** | **str** | If `true`, Stitch will automatically set new fields added in Salesforce to replicate. |
19-
**start_date** | **str** | The date from which Stitch should begin replicating data from Salesforce. Data from this date forward will be replicated. This field must contain an ISO 8601-compliant date, and the timestamp must be midnight. For example: 2018-01-01T00:00:00Z |
18+
**select_fields_by_default** | **str** | If `true`, Stitch will automatically set new fields added in Salesforce to replicate. | [optional]
19+
**start_date** | **str** | The date from which Stitch should begin replicating data from Salesforce. Data from this date forward will be replicated. This field must contain an ISO 8601-compliant date, and the timestamp must be midnight. For example: 2018-01-01T00:00:00Z | [optional]
2020
**quota_user** | **str** | Note: This is a read-only property and will be returned when the Google Analytics object is successfully created. Including it in POST or PUT requests will result in InvalidProperties errors. | [optional]
21-
**report_definitions** | [**list[GoogleAnalyticsSourceFormPropertiesReportDefinitions]**](GoogleAnalyticsSourceFormPropertiesReportDefinitions.md) | An array of objects, each object pertaining to a custom report you want to create. Note: Metrics and dimensions for each report can be selected when the source proceeds to the field_selection step. |
21+
**report_definitions** | [**list[GoogleAnalyticsSourceFormPropertiesReportDefinitions]**](GoogleAnalyticsSourceFormPropertiesReportDefinitions.md) | An array of objects, each object pertaining to a custom report you want to create. Note: Metrics and dimensions for each report can be selected when the source proceeds to the field_selection step. | [optional]
2222

2323
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2424

stitch_connect_client/models/google_analytics_source_form_properties.py

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,10 @@ def __init__(
9999
self.quota_user = quota_user
100100
if refresh_token is not None:
101101
self.refresh_token = refresh_token
102-
self.report_definitions = report_definitions
103-
self.start_date = start_date
102+
if report_definitions is not None:
103+
self.report_definitions = report_definitions
104+
if start_date is not None:
105+
self.start_date = start_date
104106

105107
@property
106108
def anchor_time(self):
@@ -283,13 +285,6 @@ def report_definitions(self, report_definitions):
283285
:param report_definitions: The report_definitions of this GoogleAnalyticsSourceFormProperties. # noqa: E501
284286
:type: list[GoogleAnalyticsSourceFormPropertiesReportDefinitions]
285287
"""
286-
if (
287-
self.local_vars_configuration.client_side_validation
288-
and report_definitions is None
289-
): # noqa: E501
290-
raise ValueError(
291-
"Invalid value for `report_definitions`, must not be `None`"
292-
) # noqa: E501
293288

294289
self._report_definitions = report_definitions
295290

@@ -313,12 +308,6 @@ def start_date(self, start_date):
313308
:param start_date: The start_date of this GoogleAnalyticsSourceFormProperties. # noqa: E501
314309
:type: str
315310
"""
316-
if (
317-
self.local_vars_configuration.client_side_validation and start_date is None
318-
): # noqa: E501
319-
raise ValueError(
320-
"Invalid value for `start_date`, must not be `None`"
321-
) # noqa: E501
322311

323312
self._start_date = start_date
324313

stitch_connect_client/models/salesforce_source_form_properties.py

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,16 @@ def __init__(
103103

104104
if anchor_time is not None:
105105
self.anchor_time = anchor_time
106-
self.api_type = api_type
106+
if api_type is not None:
107+
self.api_type = api_type
107108
if client_id is not None:
108109
self.client_id = client_id
109110
if client_secret is not None:
110111
self.client_secret = client_secret
111112
if cron_expression is not None:
112113
self.cron_expression = cron_expression
113-
self.frequency_in_minutes = frequency_in_minutes
114+
if frequency_in_minutes is not None:
115+
self.frequency_in_minutes = frequency_in_minutes
114116
if instance_url is not None:
115117
self.instance_url = instance_url
116118
if is_sandbox is not None:
@@ -121,8 +123,10 @@ def __init__(
121123
self.quota_percent_total = quota_percent_total
122124
if refresh_token is not None:
123125
self.refresh_token = refresh_token
124-
self.select_fields_by_default = select_fields_by_default
125-
self.start_date = start_date
126+
if select_fields_by_default is not None:
127+
self.select_fields_by_default = select_fields_by_default
128+
if start_date is not None:
129+
self.start_date = start_date
126130

127131
@property
128132
def anchor_time(self):
@@ -167,12 +171,6 @@ def api_type(self, api_type):
167171
:param api_type: The api_type of this SalesforceSourceFormProperties. # noqa: E501
168172
:type: str
169173
"""
170-
if (
171-
self.local_vars_configuration.client_side_validation and api_type is None
172-
): # noqa: E501
173-
raise ValueError(
174-
"Invalid value for `api_type`, must not be `None`"
175-
) # noqa: E501
176174

177175
self._api_type = api_type
178176

@@ -265,13 +263,6 @@ def frequency_in_minutes(self, frequency_in_minutes):
265263
:param frequency_in_minutes: The frequency_in_minutes of this SalesforceSourceFormProperties. # noqa: E501
266264
:type: str
267265
"""
268-
if (
269-
self.local_vars_configuration.client_side_validation
270-
and frequency_in_minutes is None
271-
): # noqa: E501
272-
raise ValueError(
273-
"Invalid value for `frequency_in_minutes`, must not be `None`"
274-
) # noqa: E501
275266

276267
self._frequency_in_minutes = frequency_in_minutes
277268

@@ -410,13 +401,6 @@ def select_fields_by_default(self, select_fields_by_default):
410401
:param select_fields_by_default: The select_fields_by_default of this SalesforceSourceFormProperties. # noqa: E501
411402
:type: str
412403
"""
413-
if (
414-
self.local_vars_configuration.client_side_validation
415-
and select_fields_by_default is None
416-
): # noqa: E501
417-
raise ValueError(
418-
"Invalid value for `select_fields_by_default`, must not be `None`"
419-
) # noqa: E501
420404

421405
self._select_fields_by_default = select_fields_by_default
422406

@@ -440,12 +424,6 @@ def start_date(self, start_date):
440424
:param start_date: The start_date of this SalesforceSourceFormProperties. # noqa: E501
441425
:type: str
442426
"""
443-
if (
444-
self.local_vars_configuration.client_side_validation and start_date is None
445-
): # noqa: E501
446-
raise ValueError(
447-
"Invalid value for `start_date`, must not be `None`"
448-
) # noqa: E501
449427

450428
self._start_date = start_date
451429

stitch_connect_client/models/source_form_properties.py

Lines changed: 10 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,16 @@ def __init__(
111111

112112
if anchor_time is not None:
113113
self.anchor_time = anchor_time
114-
self.api_type = api_type
114+
if api_type is not None:
115+
self.api_type = api_type
115116
if client_id is not None:
116117
self.client_id = client_id
117118
if client_secret is not None:
118119
self.client_secret = client_secret
119120
if cron_expression is not None:
120121
self.cron_expression = cron_expression
121-
self.frequency_in_minutes = frequency_in_minutes
122+
if frequency_in_minutes is not None:
123+
self.frequency_in_minutes = frequency_in_minutes
122124
if instance_url is not None:
123125
self.instance_url = instance_url
124126
if is_sandbox is not None:
@@ -129,11 +131,14 @@ def __init__(
129131
self.quota_percent_total = quota_percent_total
130132
if refresh_token is not None:
131133
self.refresh_token = refresh_token
132-
self.select_fields_by_default = select_fields_by_default
133-
self.start_date = start_date
134+
if select_fields_by_default is not None:
135+
self.select_fields_by_default = select_fields_by_default
136+
if start_date is not None:
137+
self.start_date = start_date
134138
if quota_user is not None:
135139
self.quota_user = quota_user
136-
self.report_definitions = report_definitions
140+
if report_definitions is not None:
141+
self.report_definitions = report_definitions
137142

138143
@property
139144
def anchor_time(self):
@@ -178,12 +183,6 @@ def api_type(self, api_type):
178183
:param api_type: The api_type of this SourceFormProperties. # noqa: E501
179184
:type: str
180185
"""
181-
if (
182-
self.local_vars_configuration.client_side_validation and api_type is None
183-
): # noqa: E501
184-
raise ValueError(
185-
"Invalid value for `api_type`, must not be `None`"
186-
) # noqa: E501
187186

188187
self._api_type = api_type
189188

@@ -276,13 +275,6 @@ def frequency_in_minutes(self, frequency_in_minutes):
276275
:param frequency_in_minutes: The frequency_in_minutes of this SourceFormProperties. # noqa: E501
277276
:type: str
278277
"""
279-
if (
280-
self.local_vars_configuration.client_side_validation
281-
and frequency_in_minutes is None
282-
): # noqa: E501
283-
raise ValueError(
284-
"Invalid value for `frequency_in_minutes`, must not be `None`"
285-
) # noqa: E501
286278

287279
self._frequency_in_minutes = frequency_in_minutes
288280

@@ -421,13 +413,6 @@ def select_fields_by_default(self, select_fields_by_default):
421413
:param select_fields_by_default: The select_fields_by_default of this SourceFormProperties. # noqa: E501
422414
:type: str
423415
"""
424-
if (
425-
self.local_vars_configuration.client_side_validation
426-
and select_fields_by_default is None
427-
): # noqa: E501
428-
raise ValueError(
429-
"Invalid value for `select_fields_by_default`, must not be `None`"
430-
) # noqa: E501
431416

432417
self._select_fields_by_default = select_fields_by_default
433418

@@ -451,12 +436,6 @@ def start_date(self, start_date):
451436
:param start_date: The start_date of this SourceFormProperties. # noqa: E501
452437
:type: str
453438
"""
454-
if (
455-
self.local_vars_configuration.client_side_validation and start_date is None
456-
): # noqa: E501
457-
raise ValueError(
458-
"Invalid value for `start_date`, must not be `None`"
459-
) # noqa: E501
460439

461440
self._start_date = start_date
462441

@@ -503,13 +482,6 @@ def report_definitions(self, report_definitions):
503482
:param report_definitions: The report_definitions of this SourceFormProperties. # noqa: E501
504483
:type: list[GoogleAnalyticsSourceFormPropertiesReportDefinitions]
505484
"""
506-
if (
507-
self.local_vars_configuration.client_side_validation
508-
and report_definitions is None
509-
): # noqa: E501
510-
raise ValueError(
511-
"Invalid value for `report_definitions`, must not be `None`"
512-
) # noqa: E501
513485

514486
self._report_definitions = report_definitions
515487

0 commit comments

Comments
 (0)