Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated support Part 1 #602

Merged
merged 7 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Sources/Core/Public/GoogleAPIClientForREST/GTLRObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@

NS_ASSUME_NONNULL_BEGIN

#ifndef GTLR_DEPRECATED
#define GTLR_DEPRECATED __attribute__((deprecated))
#endif

/**
* Protocol that can be implemented to provide custom logic for what class
* should be created out of the given JSON.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ FOUNDATION_EXTERN NSString * const kGTLRAcceleratedmobilepageurl_AmpUrlError_Err
*
* Value: "URL_IS_VALID_AMP"
*/
FOUNDATION_EXTERN NSString * const kGTLRAcceleratedmobilepageurl_AmpUrlError_ErrorCode_UrlIsValidAmp;
FOUNDATION_EXTERN NSString * const kGTLRAcceleratedmobilepageurl_AmpUrlError_ErrorCode_UrlIsValidAmp GTLR_DEPRECATED;

// ----------------------------------------------------------------------------
// GTLRAcceleratedmobilepageurl_BatchGetAmpUrlsRequest.lookupStrategy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ FOUNDATION_EXTERN NSString * const kGTLRAdExperienceReport_PlatformSummary_Bette
*
* Value: "WARNING"
*/
FOUNDATION_EXTERN NSString * const kGTLRAdExperienceReport_PlatformSummary_BetterAdsStatus_Warning;
FOUNDATION_EXTERN NSString * const kGTLRAdExperienceReport_PlatformSummary_BetterAdsStatus_Warning GTLR_DEPRECATED;

// ----------------------------------------------------------------------------
// GTLRAdExperienceReport_PlatformSummary.filterStatus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ FOUNDATION_EXTERN NSString * const kGTLRAdsense_ContentAdsSettings_Type_Feed;
*
* Value: "LINK"
*/
FOUNDATION_EXTERN NSString * const kGTLRAdsense_ContentAdsSettings_Type_Link;
FOUNDATION_EXTERN NSString * const kGTLRAdsense_ContentAdsSettings_Type_Link GTLR_DEPRECATED;
/**
* Matched content unit.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2571,7 +2571,7 @@ FOUNDATION_EXTERN NSString * const kGTLRAiplatformViewPublisherModelViewUnspecif
* An expression for filtering the Annotations that will be returned per
* DataItem. * `annotation_spec_id` - for = or !=.
*/
@property(nonatomic, copy, nullable) NSString *annotationsFilter;
@property(nonatomic, copy, nullable) NSString *annotationsFilter GTLR_DEPRECATED;

/**
* If set, only up to this many of Annotations will be returned per
Expand Down Expand Up @@ -2615,7 +2615,7 @@ FOUNDATION_EXTERN NSString * const kGTLRAiplatformViewPublisherModelViewUnspecif
* A comma-separated list of fields to order by, sorted in ascending order. Use
* "desc" after a field name for descending.
*/
@property(nonatomic, copy, nullable) NSString *orderBy;
@property(nonatomic, copy, nullable) NSString *orderBy GTLR_DEPRECATED;

/**
* A comma-separated list of annotation fields to order by, sorted in ascending
Expand Down Expand Up @@ -2654,7 +2654,7 @@ FOUNDATION_EXTERN NSString * const kGTLRAiplatformViewPublisherModelViewUnspecif
* `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}`
* All of the search will be done in the context of this SavedQuery.
*/
@property(nonatomic, copy, nullable) NSString *savedQuery;
@property(nonatomic, copy, nullable) NSString *savedQuery GTLR_DEPRECATED;

/**
* Fetches a @c GTLRAiplatform_GoogleCloudAiplatformV1SearchDataItemsResponse.
Expand Down Expand Up @@ -7912,7 +7912,7 @@ FOUNDATION_EXTERN NSString * const kGTLRAiplatformViewPublisherModelViewUnspecif
@interface GTLRAiplatformQuery_ProjectsLocationsMetadataStoresDelete : GTLRAiplatformQuery

/** Deprecated: Field is no longer supported. */
@property(nonatomic, assign) BOOL force;
@property(nonatomic, assign) BOOL force GTLR_DEPRECATED;

/**
* Required. The resource name of the MetadataStore to delete. Format:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ FOUNDATION_EXTERN NSString * const kGTLRAndroidManagement_Enterprise_EnabledNoti
*
* Value: "COMPLIANCE_REPORT"
*/
FOUNDATION_EXTERN NSString * const kGTLRAndroidManagement_Enterprise_EnabledNotificationTypes_ComplianceReport;
FOUNDATION_EXTERN NSString * const kGTLRAndroidManagement_Enterprise_EnabledNotificationTypes_ComplianceReport GTLR_DEPRECATED;
/**
* A notification sent when a device enrolls.
*
Expand Down Expand Up @@ -2454,7 +2454,7 @@ FOUNDATION_EXTERN NSString * const kGTLRAndroidManagement_PersonalUsagePolicies_
*
* Value: "BLACKLIST"
*/
FOUNDATION_EXTERN NSString * const kGTLRAndroidManagement_PersonalUsagePolicies_PersonalPlayStoreMode_Blacklist;
FOUNDATION_EXTERN NSString * const kGTLRAndroidManagement_PersonalUsagePolicies_PersonalPlayStoreMode_Blacklist GTLR_DEPRECATED;
/**
* All Play Store apps are available for installation in the personal profile,
* except those whose installType is BLOCKED in personalApplications.
Expand Down Expand Up @@ -2720,15 +2720,15 @@ FOUNDATION_EXTERN NSString * const kGTLRAndroidManagement_Policy_KeyguardDisable
*
* Value: "BATTERY_SAVING"
*/
FOUNDATION_EXTERN NSString * const kGTLRAndroidManagement_Policy_LocationMode_BatterySaving;
FOUNDATION_EXTERN NSString * const kGTLRAndroidManagement_Policy_LocationMode_BatterySaving GTLR_DEPRECATED;
/**
* On Android 8 and below, all location detection methods are enabled,
* including GPS, networks, and other sensors. On Android 9 and above, this is
* equivalent to LOCATION_ENFORCED.
*
* Value: "HIGH_ACCURACY"
*/
FOUNDATION_EXTERN NSString * const kGTLRAndroidManagement_Policy_LocationMode_HighAccuracy;
FOUNDATION_EXTERN NSString * const kGTLRAndroidManagement_Policy_LocationMode_HighAccuracy GTLR_DEPRECATED;
/**
* Disable location setting on the device.
*
Expand Down Expand Up @@ -2760,14 +2760,14 @@ FOUNDATION_EXTERN NSString * const kGTLRAndroidManagement_Policy_LocationMode_Lo
*
* Value: "OFF"
*/
FOUNDATION_EXTERN NSString * const kGTLRAndroidManagement_Policy_LocationMode_Off;
FOUNDATION_EXTERN NSString * const kGTLRAndroidManagement_Policy_LocationMode_Off GTLR_DEPRECATED;
/**
* On Android 8 and below, only GPS and other sensors are enabled. On Android 9
* and above, this is equivalent to LOCATION_ENFORCED.
*
* Value: "SENSORS_ONLY"
*/
FOUNDATION_EXTERN NSString * const kGTLRAndroidManagement_Policy_LocationMode_SensorsOnly;
FOUNDATION_EXTERN NSString * const kGTLRAndroidManagement_Policy_LocationMode_SensorsOnly GTLR_DEPRECATED;

// ----------------------------------------------------------------------------
// GTLRAndroidManagement_Policy.microphoneAccess
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ FOUNDATION_EXTERN NSString * const kGTLRAndroidManagementWipeDataFlagsWipeExtern
* Set this to field to true for all EMM-managed enterprises
* (https://developers.google.com/android/management/create-enterprise#emm-managed_enterprises).
*/
@property(nonatomic, assign) BOOL agreementAccepted;
@property(nonatomic, assign) BOOL agreementAccepted GTLR_DEPRECATED;

/**
* The enterprise token appended to the callback URL. Set this when creating a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ FOUNDATION_EXTERN NSString * const kGTLRAndroidPublisher_Grant_AppLevelPermissio
*
* Value: "CAN_ACCESS_APP"
*/
FOUNDATION_EXTERN NSString * const kGTLRAndroidPublisher_Grant_AppLevelPermissions_CanAccessApp;
FOUNDATION_EXTERN NSString * const kGTLRAndroidPublisher_Grant_AppLevelPermissions_CanAccessApp GTLR_DEPRECATED;
/**
* Manage policy related pages.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2369,15 +2369,15 @@ FOUNDATION_EXTERN NSString * const kGTLRAndroidPublisherImageTypeWearScreenshots
@interface GTLRAndroidPublisherQuery_InappproductsList : GTLRAndroidPublisherQuery

/** Deprecated and ignored. The page size is determined by the server. */
@property(nonatomic, assign) NSUInteger maxResults;
@property(nonatomic, assign) NSUInteger maxResults GTLR_DEPRECATED;

/** Package name of the app. */
@property(nonatomic, copy, nullable) NSString *packageName;

/**
* Deprecated and ignored. Set the `token` parameter to retrieve the next page.
*/
@property(nonatomic, assign) NSUInteger startIndex;
@property(nonatomic, assign) NSUInteger startIndex GTLR_DEPRECATED;

/** Pagination token. If empty, list starts at the first product. */
@property(nonatomic, copy, nullable) NSString *token;
Expand Down
7 changes: 6 additions & 1 deletion Sources/GeneratedServices/Appengine/GTLRAppengineQuery.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
// ----------------------------------------------------------------------------
// Constants

// includeExtraData
NSString * const kGTLRAppengineIncludeExtraDataIncludeExtraDataNone = @"INCLUDE_EXTRA_DATA_NONE";
NSString * const kGTLRAppengineIncludeExtraDataIncludeExtraDataUnspecified = @"INCLUDE_EXTRA_DATA_UNSPECIFIED";
NSString * const kGTLRAppengineIncludeExtraDataIncludeGoogleGeneratedMetadata = @"INCLUDE_GOOGLE_GENERATED_METADATA";

// overrideStrategy
NSString * const kGTLRAppengineOverrideStrategyOverride = @"OVERRIDE";
NSString * const kGTLRAppengineOverrideStrategyStrict = @"STRICT";
Expand Down Expand Up @@ -473,7 +478,7 @@ + (instancetype)queryWithObject:(GTLRAppengine_FirewallRule *)object

@implementation GTLRAppengineQuery_AppsGet

@dynamic appsId;
@dynamic appsId, includeExtraData;

+ (instancetype)queryWithAppsId:(NSString *)appsId {
NSArray *pathParams = @[ @"appsId" ];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -705,30 +705,30 @@ FOUNDATION_EXTERN NSString * const kGTLRAppengine_Reasons_DataGovernance_Unhide;
*
* Value: "ABORT_DEACTIVATION"
*/
FOUNDATION_EXTERN NSString * const kGTLRAppengine_Reasons_ServiceManagement_AbortDeactivation;
FOUNDATION_EXTERN NSString * const kGTLRAppengine_Reasons_ServiceManagement_AbortDeactivation GTLR_DEPRECATED;
/**
* When a customer activates an API CCFE notifies the CLH and sets the project
* to the ON state.
*
* Value: "ACTIVATION"
*/
FOUNDATION_EXTERN NSString * const kGTLRAppengine_Reasons_ServiceManagement_Activation;
FOUNDATION_EXTERN NSString * const kGTLRAppengine_Reasons_ServiceManagement_Activation GTLR_DEPRECATED;
/**
* If the deactivation is followed through with, service management needs to
* finish deactivation. Commit is a reason to put the project in a DELETED
* state.
*
* Value: "COMMIT_DEACTIVATION"
*/
FOUNDATION_EXTERN NSString * const kGTLRAppengine_Reasons_ServiceManagement_CommitDeactivation;
FOUNDATION_EXTERN NSString * const kGTLRAppengine_Reasons_ServiceManagement_CommitDeactivation GTLR_DEPRECATED;
/**
* When a customer deactivates and API service management starts a two-step
* process to perform the deactivation. The first step is to prepare. Prepare
* is a reason to put the project in a EXTERNAL_OFF state.
*
* Value: "PREPARE_DEACTIVATION"
*/
FOUNDATION_EXTERN NSString * const kGTLRAppengine_Reasons_ServiceManagement_PrepareDeactivation;
FOUNDATION_EXTERN NSString * const kGTLRAppengine_Reasons_ServiceManagement_PrepareDeactivation GTLR_DEPRECATED;
/**
* Due to various reasons CCFE might proactively restate a project state to a
* CLH to ensure that the CLH and CCFE are both aware of the project state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,28 @@ NS_ASSUME_NONNULL_BEGIN
// ----------------------------------------------------------------------------
// Constants - For some of the query classes' properties below.

// ----------------------------------------------------------------------------
// includeExtraData

/**
* Do not return any extra data
*
* Value: "INCLUDE_EXTRA_DATA_NONE"
*/
FOUNDATION_EXTERN NSString * const kGTLRAppengineIncludeExtraDataIncludeExtraDataNone;
/**
* Unspecified: No extra data will be returned
*
* Value: "INCLUDE_EXTRA_DATA_UNSPECIFIED"
*/
FOUNDATION_EXTERN NSString * const kGTLRAppengineIncludeExtraDataIncludeExtraDataUnspecified;
/**
* Return GGCM associated with the resources
*
* Value: "INCLUDE_GOOGLE_GENERATED_METADATA"
*/
FOUNDATION_EXTERN NSString * const kGTLRAppengineIncludeExtraDataIncludeGoogleGeneratedMetadata;

// ----------------------------------------------------------------------------
// overrideStrategy

Expand Down Expand Up @@ -880,6 +902,21 @@ FOUNDATION_EXTERN NSString * const kGTLRAppengineViewFullCertificate;
*/
@property(nonatomic, copy, nullable) NSString *appsId;

/**
* Options to include extra data
*
* Likely values:
* @arg @c kGTLRAppengineIncludeExtraDataIncludeExtraDataUnspecified
* Unspecified: No extra data will be returned (Value:
* "INCLUDE_EXTRA_DATA_UNSPECIFIED")
* @arg @c kGTLRAppengineIncludeExtraDataIncludeExtraDataNone Do not return
* any extra data (Value: "INCLUDE_EXTRA_DATA_NONE")
* @arg @c kGTLRAppengineIncludeExtraDataIncludeGoogleGeneratedMetadata
* Return GGCM associated with the resources (Value:
* "INCLUDE_GOOGLE_GENERATED_METADATA")
*/
@property(nonatomic, copy, nullable) NSString *includeExtraData;

/**
* Fetches a @c GTLRAppengine_Application.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ FOUNDATION_EXTERN NSString * const kGTLRArtifactRegistry_ProjectSettings_LegacyR
*
* Value: "REDIRECTION_FROM_GCR_IO_FINALIZED"
*/
FOUNDATION_EXTERN NSString * const kGTLRArtifactRegistry_ProjectSettings_LegacyRedirectionState_RedirectionFromGcrIoFinalized;
FOUNDATION_EXTERN NSString * const kGTLRArtifactRegistry_ProjectSettings_LegacyRedirectionState_RedirectionFromGcrIoFinalized GTLR_DEPRECATED;
/**
* No redirection status has been set.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ FOUNDATION_EXTERN NSString * const kGTLRAssuredworkloads_GoogleCloudAssuredworkl
*
* Value: "CONSUMER_PROJECT"
*/
FOUNDATION_EXTERN NSString * const kGTLRAssuredworkloads_GoogleCloudAssuredworkloadsV1WorkloadResourceInfo_ResourceType_ConsumerProject;
FOUNDATION_EXTERN NSString * const kGTLRAssuredworkloads_GoogleCloudAssuredworkloadsV1WorkloadResourceInfo_ResourceType_ConsumerProject GTLR_DEPRECATED;
/**
* Consumer project containing encryption keys.
*
Expand Down Expand Up @@ -572,7 +572,7 @@ FOUNDATION_EXTERN NSString * const kGTLRAssuredworkloads_GoogleCloudAssuredworkl
*
* Value: "CONSUMER_PROJECT"
*/
FOUNDATION_EXTERN NSString * const kGTLRAssuredworkloads_GoogleCloudAssuredworkloadsV1WorkloadResourceSettings_ResourceType_ConsumerProject;
FOUNDATION_EXTERN NSString * const kGTLRAssuredworkloads_GoogleCloudAssuredworkloadsV1WorkloadResourceSettings_ResourceType_ConsumerProject GTLR_DEPRECATED;
/**
* Consumer project containing encryption keys.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1890,7 +1890,7 @@ FOUNDATION_EXTERN NSString * const kGTLRAuthorizedBuyersMarketplace_VideoTargeti

/**
* The resource name of the finalized deal. Format:
* `buyers/{accountId}/finalizeddeals/{finalizedDealId}`
* `buyers/{accountId}/finalizedDeals/{finalizedDealId}`
*/
@property(nonatomic, copy, nullable) NSString *name;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
// Query Classes
//

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"

@implementation GTLRBigQueryDataTransferQuery

@dynamic fields;
Expand Down Expand Up @@ -787,3 +790,5 @@ + (instancetype)queryWithObject:(GTLRBigQueryDataTransfer_StartManualTransferRun
}

@end

#pragma clang diagnostic pop
Original file line number Diff line number Diff line change
Expand Up @@ -1046,9 +1046,11 @@ FOUNDATION_EXTERN NSString * const kGTLRBigQueryDataTransfer_TransferRun_State_T

/**
* The resource name of the transfer config. Transfer config names have the
* form `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`.
* Where `config_id` is usually a uuid, even though it is not guaranteed or
* required. The name is ignored when creating a transfer config.
* form either
* `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or
* `projects/{project_id}/transferConfigs/{config_id}`, where `config_id` is
* usually a UUID, even though it is not guaranteed or required. The name is
* ignored when creating a transfer config.
*/
@property(nonatomic, copy, nullable) NSString *name;

Expand Down
Loading