public virtual LocalResource GetResource()
 {
     YarnServerNodemanagerServiceProtos.ResourceLocalizationSpecProtoOrBuilder p = viaProto
                          ? proto : builder;
     if (resource != null)
     {
         return(resource);
     }
     if (!p.HasResource())
     {
         return(null);
     }
     resource = new LocalResourcePBImpl(p.GetResource());
     return(resource);
 }
 private void MergeLocalToBuilder()
 {
     YarnServerNodemanagerServiceProtos.ResourceLocalizationSpecProtoOrBuilder l = viaProto
                          ? proto : builder;
     if (this.resource != null && !(l.GetResource().Equals(((LocalResourcePBImpl)resource
                                                            ).GetProto())))
     {
         MaybeInitBuilder();
         builder.SetResource(((LocalResourcePBImpl)resource).GetProto());
     }
     if (this.destinationDirectory != null && !(l.GetDestinationDirectory().Equals(((URLPBImpl
                                                                                     )destinationDirectory).GetProto())))
     {
         MaybeInitBuilder();
         builder.SetDestinationDirectory(((URLPBImpl)destinationDirectory).GetProto());
     }
 }