Skip to content
This repository has been archived by the owner on Sep 9, 2023. It is now read-only.

feat: add GetAudience, 'ListAudience', 'CreateAudience', 'UpdateAudience', 'ArchiveAudience' methods to the Admin API v1alpha #441

Merged
merged 2 commits into from
Aug 5, 2022
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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse;
import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse;
import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountsPagedResponse;
import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAudiencesPagedResponse;
import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListConversionEventsPagedResponse;
import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse;
import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse;
Expand Down Expand Up @@ -565,6 +566,45 @@ public UnaryCallSettings<GetDataStreamRequest, DataStream> getDataStreamSettings
return ((AnalyticsAdminServiceStubSettings) getStubSettings()).getDataStreamSettings();
}

/** Returns the object with the settings used for calls to getAudience. */
public UnaryCallSettings<GetAudienceRequest, Audience> getAudienceSettings() {
return ((AnalyticsAdminServiceStubSettings) getStubSettings()).getAudienceSettings();
}

/** Returns the object with the settings used for calls to listAudiences. */
public PagedCallSettings<ListAudiencesRequest, ListAudiencesResponse, ListAudiencesPagedResponse>
listAudiencesSettings() {
return ((AnalyticsAdminServiceStubSettings) getStubSettings()).listAudiencesSettings();
}

/** Returns the object with the settings used for calls to createAudience. */
public UnaryCallSettings<CreateAudienceRequest, Audience> createAudienceSettings() {
return ((AnalyticsAdminServiceStubSettings) getStubSettings()).createAudienceSettings();
}

/** Returns the object with the settings used for calls to updateAudience. */
public UnaryCallSettings<UpdateAudienceRequest, Audience> updateAudienceSettings() {
return ((AnalyticsAdminServiceStubSettings) getStubSettings()).updateAudienceSettings();
}

/** Returns the object with the settings used for calls to archiveAudience. */
public UnaryCallSettings<ArchiveAudienceRequest, Empty> archiveAudienceSettings() {
return ((AnalyticsAdminServiceStubSettings) getStubSettings()).archiveAudienceSettings();
}

/** Returns the object with the settings used for calls to getAttributionSettings. */
public UnaryCallSettings<GetAttributionSettingsRequest, AttributionSettings>
getAttributionSettingsSettings() {
return ((AnalyticsAdminServiceStubSettings) getStubSettings()).getAttributionSettingsSettings();
}

/** Returns the object with the settings used for calls to updateAttributionSettings. */
public UnaryCallSettings<UpdateAttributionSettingsRequest, AttributionSettings>
updateAttributionSettingsSettings() {
return ((AnalyticsAdminServiceStubSettings) getStubSettings())
.updateAttributionSettingsSettings();
}

public static final AnalyticsAdminServiceSettings create(AnalyticsAdminServiceStubSettings stub)
throws IOException {
return new AnalyticsAdminServiceSettings.Builder(stub.toBuilder()).build();
Expand Down Expand Up @@ -1162,6 +1202,45 @@ public UnaryCallSettings.Builder<GetDataStreamRequest, DataStream> getDataStream
return getStubSettingsBuilder().getDataStreamSettings();
}

/** Returns the builder for the settings used for calls to getAudience. */
public UnaryCallSettings.Builder<GetAudienceRequest, Audience> getAudienceSettings() {
return getStubSettingsBuilder().getAudienceSettings();
}

/** Returns the builder for the settings used for calls to listAudiences. */
public PagedCallSettings.Builder<
ListAudiencesRequest, ListAudiencesResponse, ListAudiencesPagedResponse>
listAudiencesSettings() {
return getStubSettingsBuilder().listAudiencesSettings();
}

/** Returns the builder for the settings used for calls to createAudience. */
public UnaryCallSettings.Builder<CreateAudienceRequest, Audience> createAudienceSettings() {
return getStubSettingsBuilder().createAudienceSettings();
}

/** Returns the builder for the settings used for calls to updateAudience. */
public UnaryCallSettings.Builder<UpdateAudienceRequest, Audience> updateAudienceSettings() {
return getStubSettingsBuilder().updateAudienceSettings();
}

/** Returns the builder for the settings used for calls to archiveAudience. */
public UnaryCallSettings.Builder<ArchiveAudienceRequest, Empty> archiveAudienceSettings() {
return getStubSettingsBuilder().archiveAudienceSettings();
}

/** Returns the builder for the settings used for calls to getAttributionSettings. */
public UnaryCallSettings.Builder<GetAttributionSettingsRequest, AttributionSettings>
getAttributionSettingsSettings() {
return getStubSettingsBuilder().getAttributionSettingsSettings();
}

/** Returns the builder for the settings used for calls to updateAttributionSettings. */
public UnaryCallSettings.Builder<UpdateAttributionSettingsRequest, AttributionSettings>
updateAttributionSettingsSettings() {
return getStubSettingsBuilder().updateAttributionSettingsSettings();
}

@Override
public AnalyticsAdminServiceSettings build() throws IOException {
return new AnalyticsAdminServiceSettings(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"ApproveDisplayVideo360AdvertiserLinkProposal": {
"methods": ["approveDisplayVideo360AdvertiserLinkProposal", "approveDisplayVideo360AdvertiserLinkProposalCallable"]
},
"ArchiveAudience": {
"methods": ["archiveAudience", "archiveAudienceCallable"]
},
"ArchiveCustomDimension": {
"methods": ["archiveCustomDimension", "archiveCustomDimension", "archiveCustomDimension", "archiveCustomDimensionCallable"]
},
Expand All @@ -40,6 +43,9 @@
"CancelDisplayVideo360AdvertiserLinkProposal": {
"methods": ["cancelDisplayVideo360AdvertiserLinkProposal", "cancelDisplayVideo360AdvertiserLinkProposalCallable"]
},
"CreateAudience": {
"methods": ["createAudience", "createAudience", "createAudience", "createAudienceCallable"]
},
"CreateConversionEvent": {
"methods": ["createConversionEvent", "createConversionEvent", "createConversionEvent", "createConversionEventCallable"]
},
Expand Down Expand Up @@ -106,6 +112,12 @@
"GetAccount": {
"methods": ["getAccount", "getAccount", "getAccount", "getAccountCallable"]
},
"GetAttributionSettings": {
"methods": ["getAttributionSettings", "getAttributionSettings", "getAttributionSettings", "getAttributionSettingsCallable"]
},
"GetAudience": {
"methods": ["getAudience", "getAudience", "getAudience", "getAudienceCallable"]
},
"GetConversionEvent": {
"methods": ["getConversionEvent", "getConversionEvent", "getConversionEvent", "getConversionEventCallable"]
},
Expand Down Expand Up @@ -151,6 +163,9 @@
"ListAccounts": {
"methods": ["listAccounts", "listAccountsPagedCallable", "listAccountsCallable"]
},
"ListAudiences": {
"methods": ["listAudiences", "listAudiences", "listAudiences", "listAudiencesPagedCallable", "listAudiencesCallable"]
},
"ListConversionEvents": {
"methods": ["listConversionEvents", "listConversionEvents", "listConversionEvents", "listConversionEventsPagedCallable", "listConversionEventsCallable"]
},
Expand Down Expand Up @@ -193,6 +208,12 @@
"UpdateAccount": {
"methods": ["updateAccount", "updateAccount", "updateAccountCallable"]
},
"UpdateAttributionSettings": {
"methods": ["updateAttributionSettings", "updateAttributionSettings", "updateAttributionSettingsCallable"]
},
"UpdateAudience": {
"methods": ["updateAudience", "updateAudience", "updateAudienceCallable"]
},
"UpdateCustomDimension": {
"methods": ["updateCustomDimension", "updateCustomDimension", "updateCustomDimensionCallable"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
*/

/**
* The interfaces provided are listed below, along with usage samples.
* A client to Google Analytics Admin API
*
* <p>The interfaces provided are listed below, along with usage samples.
*
* <p>======================= AnalyticsAdminServiceClient =======================
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse;
import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse;
import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountsPagedResponse;
import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAudiencesPagedResponse;
import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListConversionEventsPagedResponse;
import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListCustomDimensionsPagedResponse;
import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListCustomMetricsPagedResponse;
Expand All @@ -37,8 +38,11 @@
import com.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse;
import com.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest;
import com.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse;
import com.google.analytics.admin.v1alpha.ArchiveAudienceRequest;
import com.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest;
import com.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest;
import com.google.analytics.admin.v1alpha.AttributionSettings;
import com.google.analytics.admin.v1alpha.Audience;
import com.google.analytics.admin.v1alpha.AuditUserLinksRequest;
import com.google.analytics.admin.v1alpha.AuditUserLinksResponse;
import com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest;
Expand All @@ -50,6 +54,7 @@
import com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse;
import com.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest;
import com.google.analytics.admin.v1alpha.ConversionEvent;
import com.google.analytics.admin.v1alpha.CreateAudienceRequest;
import com.google.analytics.admin.v1alpha.CreateConversionEventRequest;
import com.google.analytics.admin.v1alpha.CreateCustomDimensionRequest;
import com.google.analytics.admin.v1alpha.CreateCustomMetricRequest;
Expand Down Expand Up @@ -80,6 +85,8 @@
import com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal;
import com.google.analytics.admin.v1alpha.FirebaseLink;
import com.google.analytics.admin.v1alpha.GetAccountRequest;
import com.google.analytics.admin.v1alpha.GetAttributionSettingsRequest;
import com.google.analytics.admin.v1alpha.GetAudienceRequest;
import com.google.analytics.admin.v1alpha.GetConversionEventRequest;
import com.google.analytics.admin.v1alpha.GetCustomDimensionRequest;
import com.google.analytics.admin.v1alpha.GetCustomMetricRequest;
Expand All @@ -100,6 +107,8 @@
import com.google.analytics.admin.v1alpha.ListAccountSummariesResponse;
import com.google.analytics.admin.v1alpha.ListAccountsRequest;
import com.google.analytics.admin.v1alpha.ListAccountsResponse;
import com.google.analytics.admin.v1alpha.ListAudiencesRequest;
import com.google.analytics.admin.v1alpha.ListAudiencesResponse;
import com.google.analytics.admin.v1alpha.ListConversionEventsRequest;
import com.google.analytics.admin.v1alpha.ListConversionEventsResponse;
import com.google.analytics.admin.v1alpha.ListCustomDimensionsRequest;
Expand Down Expand Up @@ -129,6 +138,8 @@
import com.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest;
import com.google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse;
import com.google.analytics.admin.v1alpha.UpdateAccountRequest;
import com.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest;
import com.google.analytics.admin.v1alpha.UpdateAudienceRequest;
import com.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest;
import com.google.analytics.admin.v1alpha.UpdateCustomMetricRequest;
import com.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest;
Expand Down Expand Up @@ -587,6 +598,41 @@ public UnaryCallable<GetDataStreamRequest, DataStream> getDataStreamCallable() {
throw new UnsupportedOperationException("Not implemented: getDataStreamCallable()");
}

public UnaryCallable<GetAudienceRequest, Audience> getAudienceCallable() {
throw new UnsupportedOperationException("Not implemented: getAudienceCallable()");
}

public UnaryCallable<ListAudiencesRequest, ListAudiencesPagedResponse>
listAudiencesPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listAudiencesPagedCallable()");
}

public UnaryCallable<ListAudiencesRequest, ListAudiencesResponse> listAudiencesCallable() {
throw new UnsupportedOperationException("Not implemented: listAudiencesCallable()");
}

public UnaryCallable<CreateAudienceRequest, Audience> createAudienceCallable() {
throw new UnsupportedOperationException("Not implemented: createAudienceCallable()");
}

public UnaryCallable<UpdateAudienceRequest, Audience> updateAudienceCallable() {
throw new UnsupportedOperationException("Not implemented: updateAudienceCallable()");
}

public UnaryCallable<ArchiveAudienceRequest, Empty> archiveAudienceCallable() {
throw new UnsupportedOperationException("Not implemented: archiveAudienceCallable()");
}

public UnaryCallable<GetAttributionSettingsRequest, AttributionSettings>
getAttributionSettingsCallable() {
throw new UnsupportedOperationException("Not implemented: getAttributionSettingsCallable()");
}

public UnaryCallable<UpdateAttributionSettingsRequest, AttributionSettings>
updateAttributionSettingsCallable() {
throw new UnsupportedOperationException("Not implemented: updateAttributionSettingsCallable()");
}

@Override
public abstract void close();
}
Loading