public override int GetHashCode() { int hash = 1; if (ResourceName.Length != 0) { hash ^= ResourceName.GetHashCode(); } if (sharedSet_ != null) { hash ^= SharedSet.GetHashCode(); } if (criterionId_ != null) { hash ^= CriterionId.GetHashCode(); } if (Type != 0) { hash ^= Type.GetHashCode(); } if (criterionCase_ == CriterionOneofCase.Keyword) { hash ^= Keyword.GetHashCode(); } if (criterionCase_ == CriterionOneofCase.YoutubeVideo) { hash ^= YoutubeVideo.GetHashCode(); } if (criterionCase_ == CriterionOneofCase.YoutubeChannel) { hash ^= YoutubeChannel.GetHashCode(); } if (criterionCase_ == CriterionOneofCase.Placement) { hash ^= Placement.GetHashCode(); } if (criterionCase_ == CriterionOneofCase.MobileAppCategory) { hash ^= MobileAppCategory.GetHashCode(); } if (criterionCase_ == CriterionOneofCase.MobileApplication) { hash ^= MobileApplication.GetHashCode(); } hash ^= (int)criterionCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (ResourceName.Length != 0) { hash ^= ResourceName.GetHashCode(); } if (HasSharedSet) { hash ^= SharedSet.GetHashCode(); } if (HasCriterionId) { hash ^= CriterionId.GetHashCode(); } if (Type != global::Google.Ads.GoogleAds.V9.Enums.CriterionTypeEnum.Types.CriterionType.Unspecified) { hash ^= Type.GetHashCode(); } if (criterionCase_ == CriterionOneofCase.Keyword) { hash ^= Keyword.GetHashCode(); } if (criterionCase_ == CriterionOneofCase.YoutubeVideo) { hash ^= YoutubeVideo.GetHashCode(); } if (criterionCase_ == CriterionOneofCase.YoutubeChannel) { hash ^= YoutubeChannel.GetHashCode(); } if (criterionCase_ == CriterionOneofCase.Placement) { hash ^= Placement.GetHashCode(); } if (criterionCase_ == CriterionOneofCase.MobileAppCategory) { hash ^= MobileAppCategory.GetHashCode(); } if (criterionCase_ == CriterionOneofCase.MobileApplication) { hash ^= MobileApplication.GetHashCode(); } hash ^= (int)criterionCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary> /// Update the navigation property mobileAppCategories in deviceAppManagement /// <param name="body"></param> /// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param> /// </summary> public RequestInformation CreatePatchRequestInformation(MobileAppCategory body, Action <MobileAppCategoryItemRequestBuilderPatchRequestConfiguration> requestConfiguration = default) { _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation { HttpMethod = Method.PATCH, UrlTemplate = UrlTemplate, PathParameters = PathParameters, }; requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); if (requestConfiguration != null) { var requestConfig = new MobileAppCategoryItemRequestBuilderPatchRequestConfiguration(); requestConfiguration.Invoke(requestConfig); requestInfo.AddRequestOptions(requestConfig.Options); requestInfo.AddHeaders(requestConfig.Headers); } return(requestInfo); }
public void MergeFrom(CustomerNegativeCriterion other) { if (other == null) { return; } if (other.ResourceName.Length != 0) { ResourceName = other.ResourceName; } if (other.id_ != null) { if (id_ == null || other.Id != 0L) { Id = other.Id; } } if (other.Type != 0) { Type = other.Type; } switch (other.CriterionCase) { case CriterionOneofCase.ContentLabel: if (ContentLabel == null) { ContentLabel = new global::Google.Ads.GoogleAds.V2.Common.ContentLabelInfo(); } ContentLabel.MergeFrom(other.ContentLabel); break; case CriterionOneofCase.MobileApplication: if (MobileApplication == null) { MobileApplication = new global::Google.Ads.GoogleAds.V2.Common.MobileApplicationInfo(); } MobileApplication.MergeFrom(other.MobileApplication); break; case CriterionOneofCase.MobileAppCategory: if (MobileAppCategory == null) { MobileAppCategory = new global::Google.Ads.GoogleAds.V2.Common.MobileAppCategoryInfo(); } MobileAppCategory.MergeFrom(other.MobileAppCategory); break; case CriterionOneofCase.Placement: if (Placement == null) { Placement = new global::Google.Ads.GoogleAds.V2.Common.PlacementInfo(); } Placement.MergeFrom(other.Placement); break; case CriterionOneofCase.YoutubeVideo: if (YoutubeVideo == null) { YoutubeVideo = new global::Google.Ads.GoogleAds.V2.Common.YouTubeVideoInfo(); } YoutubeVideo.MergeFrom(other.YoutubeVideo); break; case CriterionOneofCase.YoutubeChannel: if (YoutubeChannel == null) { YoutubeChannel = new global::Google.Ads.GoogleAds.V2.Common.YouTubeChannelInfo(); } YoutubeChannel.MergeFrom(other.YoutubeChannel); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public void MergeFrom(SharedCriterion other) { if (other == null) { return; } if (other.ResourceName.Length != 0) { ResourceName = other.ResourceName; } if (other.sharedSet_ != null) { if (sharedSet_ == null || other.SharedSet != "") { SharedSet = other.SharedSet; } } if (other.criterionId_ != null) { if (criterionId_ == null || other.CriterionId != 0L) { CriterionId = other.CriterionId; } } if (other.Type != 0) { Type = other.Type; } switch (other.CriterionCase) { case CriterionOneofCase.Keyword: if (Keyword == null) { Keyword = new global::Google.Ads.GoogleAds.V2.Common.KeywordInfo(); } Keyword.MergeFrom(other.Keyword); break; case CriterionOneofCase.YoutubeVideo: if (YoutubeVideo == null) { YoutubeVideo = new global::Google.Ads.GoogleAds.V2.Common.YouTubeVideoInfo(); } YoutubeVideo.MergeFrom(other.YoutubeVideo); break; case CriterionOneofCase.YoutubeChannel: if (YoutubeChannel == null) { YoutubeChannel = new global::Google.Ads.GoogleAds.V2.Common.YouTubeChannelInfo(); } YoutubeChannel.MergeFrom(other.YoutubeChannel); break; case CriterionOneofCase.Placement: if (Placement == null) { Placement = new global::Google.Ads.GoogleAds.V2.Common.PlacementInfo(); } Placement.MergeFrom(other.Placement); break; case CriterionOneofCase.MobileAppCategory: if (MobileAppCategory == null) { MobileAppCategory = new global::Google.Ads.GoogleAds.V2.Common.MobileAppCategoryInfo(); } MobileAppCategory.MergeFrom(other.MobileAppCategory); break; case CriterionOneofCase.MobileApplication: if (MobileApplication == null) { MobileApplication = new global::Google.Ads.GoogleAds.V2.Common.MobileApplicationInfo(); } MobileApplication.MergeFrom(other.MobileApplication); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }